package jpa.entitys.promis.construction;

import java.io.Serializable;

import javax.persistence.*;

import java.math.BigDecimal;
import java.util.Date;


/**
 * The persistent class for the SYNC_PR_BUDGET database table.
 * 
 */
@Entity
@Table(name="VW_SYNC_PR_BUDGET")
@NamedQueries({
    @NamedQuery(name = "SyncPrBudget.findAll", query = " SELECT c FROM SyncPrBudget c "),
    @NamedQuery(name = "SyncPrBudget.findById", query = " SELECT c FROM SyncPrBudget c WHERE c.prDetailId = :Id "),
    @NamedQuery(name = "SyncPrBudget.findByPrDocument", query = " SELECT c FROM SyncPrBudget c WHERE c.status = 'A' And c.company = :company And c.project = :project And c.documentNo = :documentNo And c.seqNo = :seqNo "),
    @NamedQuery(name = "SyncPrBudget.findByVODocument", query = " SELECT c FROM SyncPrBudget c WHERE c.company = :company And c.project = :project And c.refVoDocNumber = :refVoDocNumber And c.status = :status order by c.company,c.project,c.refVoDocNumber,c.status,c.seqNo asc"),
    @NamedQuery(name = "SyncPrBudget.findByPRId", query = " SELECT c FROM SyncPrBudget c WHERE c.prHeaderId = :prHeaderId ")
})
public class SyncPrBudget extends jpa.entitys.common.CommonEntity implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@Column(name="PR_DETAIL_ID", length=200)
	private String prDetailId;

	@Override public String toString() { return org.apache.commons.lang.builder.ToStringBuilder.reflectionToString(this);}
	
	@Column(name="PR_HEADER_ID", length=100)
	private String prHeaderId;
	
	@Column(name="BUILDING_PHASE", length=30)
	private String buildingPhase;

	@Column(length=2)
	private String company;

	@Column(name="CONSTRUCTION_BUDGET", precision=22)
	private BigDecimal constructionBudget;

	@Column(name="CONSTRUCTION_COST", precision=22)
	private BigDecimal constructionCost;

	@Column(name="CREATED_BY", length=30)
	private String createdBy;

    @Temporal( TemporalType.TIMESTAMP)
	@Column(name="CREATED_ON")
	private Date createdOn;

	@Column(name="CUMULATIVE_QTY", precision=18, scale=3)
	private BigDecimal cumulativeQty;

	@Column(name="ITEM_CODE", length=30)
	private String itemCode;

	@Column(name="ITEM_DESC", length=100)
	private String itemDesc;

	@Column(name="ITEM_UM", length=30)
	private String itemUm;

	@Column(name="ITEM_UM_QTY", precision=18, scale=3)
	private BigDecimal itemUmQty;

	@Column(name="LAST_UPD_BY", length=30)
	private String lastUpdBy;

    @Temporal( TemporalType.TIMESTAMP)
	@Column(name="LAST_UPD_ON")
	private Date lastUpdOn;

	@Column(name="LINE_NO", precision=3)
	private BigDecimal lineNo;

	@Column(name="PO_AVG_RATE", precision=16, scale=4)
	private BigDecimal poAvgRate;

	@Column(name="PO_VALUE_FC", precision=18, scale=2)
	private BigDecimal poValueFc;

	@Column(name="PO_VALUE_LC", precision=18, scale=2)
	private BigDecimal poValueLc;

    @Temporal( TemporalType.TIMESTAMP)
	@Column(name="POR_DATE")
	private Date porDate;

	@Column(name="POR_NO", precision=6)
	private BigDecimal porNo;

	@Column(name="POR_SEQ_NO", precision=3)
	private BigDecimal porSeqNo;

	@Column(name="POR_SERIES", length=4)
	private String porSeries;

	@Column(name="POR_TYPE", length=2)
	private String porType;	

	@Column(length=30)
	private String project;

	@Column(name="PROMOTION_BUDGET", precision=22)
	private BigDecimal promotionBudget;

	@Column(name="PROMOTION_COST", precision=22)
	private BigDecimal promotionCost;

	@Column(name="PURCHASE_REQUEST_BUDGET_ID", length=100)
	private String purchaseRequestBudgetId;

	@Column(name="REF_NO", precision=6)
	private BigDecimal refNo;

	@Column(name="REF_REV", precision=3)
	private BigDecimal refRev;

	@Column(name="REF_SEQ", precision=4)
	private BigDecimal refSeq;

	@Column(name="REF_SERIES", length=4)
	private String refSeries;

	@Column(name="REF_TYPE", length=3)
	private String refType;

    @Temporal( TemporalType.TIMESTAMP)
	@Column(name="REQUIRED_BY_DATE")
	private Date requiredByDate;

	@Column(name="SEQ_NO", precision=22)
	private BigDecimal seqNo;

	@Column(name="SERVICES_BUDGET", precision=22)
	private BigDecimal servicesBudget;

	@Column(name="SERVICES_COST", precision=22)
	private BigDecimal servicesCost;

	@Column(length=1)
	private String status;

	@Column(name="SYNC_CREATEDBY", length=100)
	private String syncCreatedby;

    @Temporal( TemporalType.TIMESTAMP)
	@Column(name="SYNC_CREATEDON")
	private Date syncCreatedon;

	@Column(name="SYNC_EXTERNAL_REF_KEY", length=100)
	private String syncExternalRefKey;

	@Column(name="SYNC_EXTERNAL_REF_NO", length=100)
	private String syncExternalRefNo;

	@Column(name="SYNC_ISSTAGING", length=1)
	private String syncIsstaging;

	@Column(name="SYNC_ISSYNC", length=1)
	private String syncIssync;

	@Column(name="SYNC_UPDATEDBY", length=100)
	private String syncUpdatedby;

    @Temporal( TemporalType.TIMESTAMP)
	@Column(name="SYNC_UPDATEDON")
	private Date syncUpdatedon;

	@Column(name="TOTAL_BUDGET", precision=22)
	private BigDecimal totalBudget;

	@Column(name="TOTAL_COST", precision=22)
	private BigDecimal totalCost;

	@Column(name="TYPE_OF_PURCHASE")
	private String typeOfPurchase;

	@Column(name="UNIT_ID", precision=22)
	private BigDecimal unitId;

	@Column(name="UNIT_NUMBER", length=30)
	private String unitNumber;

	@Column(name="ZONE_CODE", length=30)
	private String zoneCode;
	
	@Column(name="DOCUMENT_NO", length=30)
	private String documentNo;

	@Column(name="REF_VO_DOC_NUMBER", length=4000)
	private String refVoDocNumber;
	
	@Column(name="ACTIVITY_GROUP_CODE")
	private String activityGroupCode;
	
	@Column(name="REMARKS")
	private String remarks;
	
	/**
	 * @return the remarks
	 */
	public String getRemarks() {
		return remarks;
	}

	/**
	 * @param remarks the remarks to set
	 */
	public void setRemarks(String remarks) {
		this.remarks = remarks;
	}

	/**
	 * @return the activityGroupCode
	 */
	public String getActivityGroupCode() {
		return activityGroupCode;
	}

	/**
	 * @param activityGroupCode the activityGroupCode to set
	 */
	public void setActivityGroupCode(String activityGroupCode) {
		this.activityGroupCode = activityGroupCode;
	}

	/**
	 * @return the refVoDocNumber
	 */
	public String getRefVoDocNumber() {
		return refVoDocNumber;
	}

	/**
	 * @param refVoDocNumber the refVoDocNumber to set
	 */
	public void setRefVoDocNumber(String refVoDocNumber) {
		this.refVoDocNumber = refVoDocNumber;
	}

	/**
	 * @return the documentNo
	 */
	public String getDocumentNo() {
		return documentNo;
	}

	/**
	 * @param documentNo the documentNo to set
	 */
	public void setDocumentNo(String documentNo) {
		this.documentNo = documentNo;
	}

	public SyncPrBudget() {
    }

	public String getBuildingPhase() {
		return this.buildingPhase;
	}

	public void setBuildingPhase(String buildingPhase) {
		this.buildingPhase = buildingPhase;
	}

	public String getCompany() {
		return this.company;
	}

	public void setCompany(String company) {
		this.company = company;
	}

	public BigDecimal getConstructionBudget() {
		return this.constructionBudget;
	}

	public void setConstructionBudget(BigDecimal constructionBudget) {
		this.constructionBudget = constructionBudget;
	}

	public BigDecimal getConstructionCost() {
		return this.constructionCost;
	}

	public void setConstructionCost(BigDecimal constructionCost) {
		this.constructionCost = constructionCost;
	}

	public String getCreatedBy() {
		return this.createdBy;
	}

	public void setCreatedBy(String createdBy) {
		this.createdBy = createdBy;
	}

	public Date getCreatedOn() {
		return this.createdOn;
	}

	public void setCreatedOn(Date createdOn) {
		this.createdOn = createdOn;
	}

	public BigDecimal getCumulativeQty() {
		return this.cumulativeQty;
	}

	public void setCumulativeQty(BigDecimal cumulativeQty) {
		this.cumulativeQty = cumulativeQty;
	}

	public String getItemCode() {
		return this.itemCode;
	}

	public void setItemCode(String itemCode) {
		this.itemCode = itemCode;
	}

	public String getItemDesc() {
		return this.itemDesc;
	}

	public void setItemDesc(String itemDesc) {
		this.itemDesc = itemDesc;
	}

	public String getItemUm() {
		return this.itemUm;
	}

	public void setItemUm(String itemUm) {
		this.itemUm = itemUm;
	}

	public BigDecimal getItemUmQty() {
		return this.itemUmQty;
	}

	public void setItemUmQty(BigDecimal itemUmQty) {
		this.itemUmQty = itemUmQty;
	}

	public String getLastUpdBy() {
		return this.lastUpdBy;
	}

	public void setLastUpdBy(String lastUpdBy) {
		this.lastUpdBy = lastUpdBy;
	}

	public Date getLastUpdOn() {
		return this.lastUpdOn;
	}

	public void setLastUpdOn(Date lastUpdOn) {
		this.lastUpdOn = lastUpdOn;
	}

	public BigDecimal getLineNo() {
		return this.lineNo;
	}

	public void setLineNo(BigDecimal lineNo) {
		this.lineNo = lineNo;
	}

	public BigDecimal getPoAvgRate() {
		return this.poAvgRate;
	}

	public void setPoAvgRate(BigDecimal poAvgRate) {
		this.poAvgRate = poAvgRate;
	}

	public BigDecimal getPoValueFc() {
		return this.poValueFc;
	}

	public void setPoValueFc(BigDecimal poValueFc) {
		this.poValueFc = poValueFc;
	}

	public BigDecimal getPoValueLc() {
		return this.poValueLc;
	}

	public void setPoValueLc(BigDecimal poValueLc) {
		this.poValueLc = poValueLc;
	}

	public Date getPorDate() {
		return this.porDate;
	}

	public void setPorDate(Date porDate) {
		this.porDate = porDate;
	}

	public BigDecimal getPorNo() {
		return this.porNo;
	}

	public void setPorNo(BigDecimal porNo) {
		this.porNo = porNo;
	}

	public BigDecimal getPorSeqNo() {
		return this.porSeqNo;
	}

	public void setPorSeqNo(BigDecimal porSeqNo) {
		this.porSeqNo = porSeqNo;
	}

	public String getPorSeries() {
		return this.porSeries;
	}

	public void setPorSeries(String porSeries) {
		this.porSeries = porSeries;
	}

	public String getPorType() {
		return this.porType;
	}

	public void setPorType(String porType) {
		this.porType = porType;
	}

	public String getPrDetailId() {
		return this.prDetailId;
	}

	public void setPrDetailId(String prDetailId) {
		this.prDetailId = prDetailId;
	}

	public String getPrHeaderId() {
		return this.prHeaderId;
	}

	public void setPrHeaderId(String prHeaderId) {
		this.prHeaderId = prHeaderId;
	}

	public String getProject() {
		return this.project;
	}

	public void setProject(String project) {
		this.project = project;
	}

	public BigDecimal getPromotionBudget() {
		return this.promotionBudget;
	}

	public void setPromotionBudget(BigDecimal promotionBudget) {
		this.promotionBudget = promotionBudget;
	}

	public BigDecimal getPromotionCost() {
		return this.promotionCost;
	}

	public void setPromotionCost(BigDecimal promotionCost) {
		this.promotionCost = promotionCost;
	}

	public String getPurchaseRequestBudgetId() {
		return this.purchaseRequestBudgetId;
	}

	public void setPurchaseRequestBudgetId(String purchaseRequestBudgetId) {
		this.purchaseRequestBudgetId = purchaseRequestBudgetId;
	}

	public BigDecimal getRefNo() {
		return this.refNo;
	}

	public void setRefNo(BigDecimal refNo) {
		this.refNo = refNo;
	}

	public BigDecimal getRefRev() {
		return this.refRev;
	}

	public void setRefRev(BigDecimal refRev) {
		this.refRev = refRev;
	}

	public BigDecimal getRefSeq() {
		return this.refSeq;
	}

	public void setRefSeq(BigDecimal refSeq) {
		this.refSeq = refSeq;
	}

	public String getRefSeries() {
		return this.refSeries;
	}

	public void setRefSeries(String refSeries) {
		this.refSeries = refSeries;
	}

	public String getRefType() {
		return this.refType;
	}

	public void setRefType(String refType) {
		this.refType = refType;
	}

	public Date getRequiredByDate() {
		return this.requiredByDate;
	}

	public void setRequiredByDate(Date requiredByDate) {
		this.requiredByDate = requiredByDate;
	}

	public BigDecimal getSeqNo() {
		return this.seqNo;
	}

	public void setSeqNo(BigDecimal seqNo) {
		this.seqNo = seqNo;
	}

	public BigDecimal getServicesBudget() {
		return this.servicesBudget;
	}

	public void setServicesBudget(BigDecimal servicesBudget) {
		this.servicesBudget = servicesBudget;
	}

	public BigDecimal getServicesCost() {
		return this.servicesCost;
	}

	public void setServicesCost(BigDecimal servicesCost) {
		this.servicesCost = servicesCost;
	}

	public String getStatus() {
		return this.status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public String getSyncCreatedby() {
		return this.syncCreatedby;
	}

	public void setSyncCreatedby(String syncCreatedby) {
		this.syncCreatedby = syncCreatedby;
	}

	public Date getSyncCreatedon() {
		return this.syncCreatedon;
	}

	public void setSyncCreatedon(Date syncCreatedon) {
		this.syncCreatedon = syncCreatedon;
	}

	public String getSyncExternalRefKey() {
		return this.syncExternalRefKey;
	}

	public void setSyncExternalRefKey(String syncExternalRefKey) {
		this.syncExternalRefKey = syncExternalRefKey;
	}

	public String getSyncExternalRefNo() {
		return this.syncExternalRefNo;
	}

	public void setSyncExternalRefNo(String syncExternalRefNo) {
		this.syncExternalRefNo = syncExternalRefNo;
	}

	public String getSyncIsstaging() {
		return this.syncIsstaging;
	}

	public void setSyncIsstaging(String syncIsstaging) {
		this.syncIsstaging = syncIsstaging;
	}

	public String getSyncIssync() {
		return this.syncIssync;
	}

	public void setSyncIssync(String syncIssync) {
		this.syncIssync = syncIssync;
	}

	public String getSyncUpdatedby() {
		return this.syncUpdatedby;
	}

	public void setSyncUpdatedby(String syncUpdatedby) {
		this.syncUpdatedby = syncUpdatedby;
	}

	public Date getSyncUpdatedon() {
		return this.syncUpdatedon;
	}

	public void setSyncUpdatedon(Date syncUpdatedon) {
		this.syncUpdatedon = syncUpdatedon;
	}

	public BigDecimal getTotalBudget() {
		return this.totalBudget;
	}

	public void setTotalBudget(BigDecimal totalBudget) {
		this.totalBudget = totalBudget;
	}

	public BigDecimal getTotalCost() {
		return this.totalCost;
	}

	public void setTotalCost(BigDecimal totalCost) {
		this.totalCost = totalCost;
	}

	public String getTypeOfPurchase() {
		return this.typeOfPurchase;
	}

	public void setTypeOfPurchase(String typeOfPurchase) {
		this.typeOfPurchase = typeOfPurchase;
	}

	public BigDecimal getUnitId() {
		return this.unitId;
	}

	public void setUnitId(BigDecimal unitId) {
		this.unitId = unitId;
	}

	public String getUnitNumber() {
		return this.unitNumber;
	}

	public void setUnitNumber(String unitNumber) {
		this.unitNumber = unitNumber;
	}

	public String getZoneCode() {
		return this.zoneCode;
	}

	public void setZoneCode(String zoneCode) {
		this.zoneCode = zoneCode;
	}

}